<?php
############## DIT STUK CODE ZORGT ERVOOR DAT JE ALS ADMIN INGELOGD MOET ZIJN OM DE PAGINA TE KUNNEN ZIEN ##############

    //Start de sessie
    session_start();

    //Load de benodigde bestanden
    require_once("includes/auth.php");

########################################################################################################################
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Omzet vanaf datum</title>
  <link type="text/css" href="../css/pagination.css" rel="stylesheet" />
  <link rel="stylesheet" href="../css/reset.css" type="text/css" />
  <link rel="stylesheet" href="../css/960.css" type="text/css" />
  <link rel="stylesheet" href="../css/text.css" type="text/css" />
  <link type="text/css" href="../css/tablesorter.css" rel="stylesheet" />
  <link type="text/css" href="../css/pager.css" rel="stylesheet" />
  <link type="text/css" href="../css/sunny/jquery-ui-1.8.custom.css" rel="stylesheet" />
  <link type="text/css" href="../css/jquery.autocomplete.css" rel="stylesheet" />
  <link type="text/css" href="../css/style.css" rel="stylesheet" />
  <link type="text/css" href="../css/accmenu.css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery-1.4.2.min.js">
</script>
<script type="text/javascript" src="../js/jquery-ui-1.8.custom.min.js">
</script>
<script type="text/javascript" src="../js/jquery.tablesorter.js">
</script>
<script type="text/javascript" src="../js/jquery.tablesorter.pager.js">
</script>
<script type="text/javascript" src="../js/jquery.autocomplete.min.js">
</script>
<script type="text/javascript" src="../js/menu.js">
</script>
<script type="text/javascript">
$(document).ready(function()
    {
        $("#datefield").datepicker( { dateFormat: 'yy-mm-dd' } );
        //      geen cache want we zijn dynamisch
         $.ajaxSetup ({
                     cache: false
             });
        // URL van te laden data
         var loadUrl = "content/omzet_content.php";

        //Shiney wacht icoontje
         var ajax_load = "<img class='loading' src='../img/load.gif' alt='loading...' />";

         $("#result").html(ajax_load).load(loadUrl);
    }
);
</script>

</head>
<body>
<div class="container_12">
<div id="header" class="grid_12">


</div>
<div class="clear"></div>
<div class="grid_12 spacer"></div>
<div class="clear"></div>
<div id="menu" class="grid_2">

        <?php
        include_once 'temp/menu_filler.php';
        ?>


</div>
<div id="adminarea" class="grid_10">
    <div id="tableholder">
            Datum (jaar-maand-dag): <input type="text" id="datefield" size="10" maxlength="10" name="datum">
            <input type="submit" value="submit" name="submit" id="setdate"><br />
<script type="text/javascript">
 //      geen cache want we zijn dynamisch
     $.ajaxSetup ({
             cache: false
     });
 // URL van te laden data
     var loadUrl = "content/omzet_content.php";

 //Shiney wacht icoontje
     var ajax_load = "<img class='loading' src='../img/load.gif' alt='loading...' />";

 //      bind ajax calls aan buttons voor het laden van klantgegevens met bepaalde sortering
     $("#setdate").click(function(){
        $("#result")
            .html(ajax_load)
            .load(loadUrl, "datum=" + $('#datefield').val());
     });

 </script>

        <div id="result"></div>

    </div>

</div>
<div class="clear"></div>
<div class="grid_12 spacer"></div>
<div class="clear"></div>
</div>
</body>
</html>